PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Window Manager >

Programming With the Mac OS 8.5 Window Manager


SetWindowProxyIcon

Overrides the default proxy icon for a window.

pascal OSStatus SetWindowProxyIcon (
                     WindowPtr window,
                     IconRef icon);
window
A value of type WindowPtr . Pass a pointer to the window for which you wish to set the proxy icon.
icon
A value of type IconRef . Pass an icon reference identifying the icon to be used for the window's proxy icon. If there is already a proxy icon in use of the type desired, an IconRef value may be obtained for that icon by calling the function GetWindowProxyIcon . Otherwise, your application must call the Icon Services function GetIconRefFromFile to get a value of type IconRef .
function result
A result code. See Result Codes.
DISCUSSION

If you wish to override the proxy icon that the Window Manager displays by default for a given file, your application should call the SetWindowProxyIcon function.

More typically, when you do not wish to override a window's default proxy icon, your application would call one of the following functions: SetWindowProxyFSSpec , SetWindowProxyAlias , or SetWindowProxyCreatorAndType .

See Supporting Window Proxy Icons for examples of how your application can provide proxy icon support in its document windows.

SPECIAL CONSIDERATIONS

With Mac OS 8.5, you must save and restore the current graphics port--by calling the QuickDraw functions GetPort and SetPort --around each call to the SetWindowProxyIcon function.

VERSION NOTES

Available with Mac OS 8.5 and later.

SEE ALSO

The function GetWindowProxyIcon .


© 1999 Apple Computer, Inc. – (Last Updated 18 March 99)